export const getListData = data => {
    return {
      type   : "GETDATA",
      payload: data
    };
  };
  
  export const getOne = (id) => {
      var url = `http://134.175.39.187:3001/product/${id}`
    return dispatch => {
      fetch(url)
        .then(function(res) {
          return res.json();
        })
        .then(function(data) {
          dispatch(getListData(data));
        });
    };
  };